import AxiosApi from "@/api/AxiosApi"
import type { PlanItems } from "@/interface/harvestInterface"
import axios from "axios"

export async function getPlans() {
    const result = await AxiosApi.get("/harvest/plans")
    return result.data
}
export async function getRecord() {
    const result = await AxiosApi.get("/harvest/record")
    return result.data
}
// 获取采收统计数据


//删除某个数据
export async function deleteBatch(batch:number){
    const result=await AxiosApi.delete("/harvest/"+batch)
    return result.data
}

// 修改用户数据
export async function editHarvest(tableData1:PlanItems){
    const result=await AxiosApi.put("/harvest/"+tableData1.batch)
    return result.data
}

// 新增用户
export async function addHarvest(tableData1:PlanItems){
    const  result=await AxiosApi.post("/harvest/create")
}

